#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int fun(int x) {
	int countx = 0;
	while (x)
	{
		countx++;
		x = x & (x-1);
	}
	return countx;
}
int main()
{
	printf("%d", fun(500));
}